package com.nuc.iblog.service.imp;

import com.nuc.iblog.entity.ArticleModel;
import com.nuc.iblog.jpa.ArticleModelJpa;
import com.nuc.iblog.service.ArticleModelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ClArticleModelServiceImp implements ArticleModelService {

    @Autowired
    private ArticleModelJpa articleModelJpa;

    @Override
    public List<ArticleModel> getAllArticleModel() {
        return articleModelJpa.findAll();
    }

    @Override
    public ArticleModel getByid(int amid) {
        return articleModelJpa.findOne(amid);
    }
}
